<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/11/4 0004
 * Time: 09:03
 */
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\LinkPager;

?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>Blog Template for Bootstrap</title>

    <!-- Bootstrap core CSS -->
    <link href="./dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="./css/blog.css" rel="stylesheet">


    <script src="./js/ie-emulation-modes-warning.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>


<div class="container">
    <link href="./css/blog.css" rel="stylesheet">
    <div class="container">

        <div class="blog-header">
            <h1 class="blog-title">The Help friends Blog</h1>
            <p class="lead blog-description">Help friends blog welcome you to join.</p>
        </div>

        <div class="row">

            <div class="col-sm-8 blog-main">

                <div class="blog-post">
                    <h2 class="blog-post-title"><?=Html::encode("{$article->title}")?></h2>
                    <p class="blog-post-meta"><?=Html::encode(" {$article->now}")?><a href="#"><?=Html::encode(" {$article->author}")?></a></p>
                    <div class="panel panel-default" style="word-break:break-all;text-indent: 2em;">
                        <div class="panel-body" >
                            <p class="blog-post-meta"><?=Html::encode(" {$article->content}")?></p>
                        </div>
                    </div>
                    </br>
                    <p class="blog-post-meta">评论列表</p>
                    <form method="post" action="<?php echo Url::to(['filecomment/addcomment'])?>">
                        <div class="mod-body">
                            <h5>评论:</h5>
                            <div class="aw-mod aw-editor-box">
                                    <input id="fid" name="fid" type="hidden" value="<?=Html::encode("{$article->id}")?>"/>
                                    <div class="mod-head">
                                        <div class="wmd-panel">
                                            <div id="wmd-button-bar"></div>
                                            <textarea class="wmd-input form-control autosize" id="question_detail" rows="2" name="question_detail"></textarea>
                                        </div>
                                    </div>
                                    <div class="mod-footer clearfix">
                                        <button class="btn btn-large btn-success pull-right" type="submit" name="login" id="loginButton">确认评论</button>
                                    </div>
                            </div>
                        </div>
                    </form>
                    <?php foreach ($comment as $comments):?>
                        <p class="blog-post-meta"><?=Html::encode(" {$comments->datetime}")?><a href="#"><?=Html::encode(" {$comments->username}")?></a>:</p>

                            <div class="panel-body" >
                                <p class="blog-post-meta"><?=Html::encode(" {$comments->content}")?></p>
                            </div>


                    <?php endforeach; ?>
                </div>
            </div><!-- /.blog-main -->

            <div class="col-sm-3 col-sm-offset-1 blog-sidebar">
                <div class="sidebar-module sidebar-module-inset">
                    <div class="sidebar-module sidebar-module-inset">
                        <h4>Latest News</h4>
                        <ul>
                            <?php foreach ($countries as $country):?>
                                <li><a href="index.php?r=site/news-detailed&id=<?=Html::encode("{$country->id}")?>"><?=Html::encode(" {$country->title}")?>;</a>
                                </li>
                            <?php endforeach; ?>

                        </ul>
                    </div>
                </div>
                <div class="sidebar-module">
                    <h4>Celebrity</h4>
                    <ol class="list-unstyled">
                        <ul>
                            <?php foreach ($r as $countrys):?>
                                <li><a href="index.php?r=user/friend&regname=<?=Html::encode("{$countrys->regname}")?>"><?=Html::encode(" {$countrys->regname}")?>;</a>
                                </li>
                            <?php endforeach; ?>
                        </ul>
                    </ol>
                </div>
                <div class="sidebar-module">
                    <h4>Elsewhere</h4>
                    <ol class="list-unstyled">
                        <li><a href="http://bbs.houdunwang.com/forum-282-1.html"  target="_blank">YII2视频教程</a></li>
                        <li><a href="http://www.yiichina.com/doc/guide/2.0"  target="_blank">YII2官网</a></li>
                        <li><a href="http://edu.51cto.com/index.php?do=lesson&id=91056"  target="_blank">bootstrap视频教程</a></li>
                        <li><a href="http://v3.bootcss.com/"  target="_blank">bootstrap官方</a></li>
                    </ol>
                </div>
            </div><!-- /.blog-sidebar -->

        </div><!-- /.row -->

    </div><!-- /.container -->


    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
    <script src="./dist/js/bootstrap.min.js"></script>

</body>


</html>









